package cn.itsource.org.domain;

import cn.itsource.basic.domain.BaseDomain;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;
import lombok.ToString;

import java.util.ArrayList;
import java.util.List;

@Data
@ToString
public class Department extends BaseDomain {

    private String sn;
    private String name;
    private String dirPath;
    private Integer state;
    private Long manager_id;
    private Long parent_id;
    private Long shop_id;

    /*部门经理*/
    private Employee manager;
    /*上级部门*/
    private Department parent;

    /*自己的子部门*/
    @JsonInclude(JsonInclude.Include.NON_EMPTY)/*如果集合为空 就不转化成json字符串返给前端*/
    private List<Department> children = new ArrayList<>();

}
